import { defineStore } from 'pinia'
import chatApi from '@/apis/chat'

export const useAssistantStore = defineStore('assistant', {
  state: () => ({
    categories: [],
    active: null,
  }),
  actions: {
    async getCategories() {
      this.categories = (await chatApi.category.list('assistant')).data
    },
    setActive(assistant) {
      this.active = assistant
    },
  },
})
